from django.contrib import admin

# Register your models here.
from .models import MovieTypeCategory
from .models import MovieKindCategory
from .models import MovieStaffCategory
from .models import MovieStaff
from .models import SubTitle
from .models import MovieCountry
from .models import MovieDetail
from .models import MovieAllStaffs
from .models import CinemaCity
from .models import Cinema
from .models import MovieHall
from .models import FilmRowPiece
from .models import Seat
from .models import MovieImages
from .models import MoviePieceSeat


class MovieTypeCategoryAdmin(admin.ModelAdmin):
    pass


class MovieKindCategoryAdmin(admin.ModelAdmin):
    pass


class MovieStaffCategoryAdmin(admin.ModelAdmin):
    pass


class MovieStaffAdmin(admin.ModelAdmin):
    pass


class SubTitleAdmin(admin.ModelAdmin):
    pass


class MovieCountryAdmin(admin.ModelAdmin):
    pass


class MovieDetailAdmin(admin.ModelAdmin):
    # fields = (('name', 'status'), 'sub_title')

    # fieldsets = (
    #     (None, {
    #         'fields': (('name', 'status'), 'sub_title')
    #     }),
    #     ('Advanced options', {
    #         'classes': ('collapse',),
    #         'fields': ('view_num', 'is_banner'),
    #     }),
    # )
    list_display = ('id', 'name', 'status')

    list_display_links = ('name',)
    list_editable = ("status",)
    list_filter = ('kind_category',)
    search_fields = ['name']

    class Img(admin.TabularInline):
        model = MovieImages

    inlines = [Img]


class MovieAllStaffsAdmin(admin.ModelAdmin):
    pass


class CinemaCityAdmin(admin.ModelAdmin):
    pass


class CinemaAdmin(admin.ModelAdmin):
    pass


class MovieHallAdmin(admin.ModelAdmin):
    pass


class FilmRowPieceAdmin(admin.ModelAdmin):
    list_display = ('id','movie_name','online_price','movie_hall','start_time','end_time')
    list_editable = ('online_price',)


class SeatAdmin(admin.ModelAdmin):
    pass


class MoviePieceSeatAdmin(admin.ModelAdmin):
    list_display = ('id','seat','movie_piece')
    list_display_links = ('movie_piece',)


admin.site.register(MovieTypeCategory, MovieTypeCategoryAdmin)
admin.site.register(MovieKindCategory, MovieKindCategoryAdmin)
admin.site.register(MovieStaffCategory, MovieStaffCategoryAdmin)
admin.site.register(MovieStaff, MovieStaffAdmin)
admin.site.register(SubTitle, SubTitleAdmin)
admin.site.register(MovieCountry, MovieCountryAdmin)
admin.site.register(MovieDetail, MovieDetailAdmin)
admin.site.register(MovieAllStaffs, MovieAllStaffsAdmin)
admin.site.register(CinemaCity, CinemaCityAdmin)
admin.site.register(Cinema, CinemaAdmin)
admin.site.register(MovieHall, MovieHallAdmin)
admin.site.register(FilmRowPiece, FilmRowPieceAdmin)
admin.site.register(Seat, SeatAdmin)
admin.site.register(MoviePieceSeat, MoviePieceSeatAdmin)
